/*
 * tcp_client.cpp
 *
 *  Created on: 2016-2-27
 *      Author: ZhangXiyin
 */

#include "tcp_client.h"
#include "thread/single/service.h"
#include "tcp_socket.h"
namespace eyas{
namespace io{
tcp_client::tcp_client()
:tcpSocketPtr_(new tcp_socket(service::instance()->io_service()))
, ioService_(tcpSocketPtr_->get_ioservice()), socket_(tcpSocketPtr_->get_socket()), endpoint_(tcpSocketPtr_->get_endpoint()){
}
tcp_client::~tcp_client() {
	this->close();
}
void tcp_client::close(){
	this->socket_.close();
}
}
}
